import http from '../common/js/http'

// 匹配队伍
export function match(params) {
  let url = `match/number`

  return http.get(url, {params: params}).then(response => {
    return Promise.resolve(response)
  })
}

export function info(id) {
  let url = `troops/info/${id}`

  return http.get(url).then(response => {
    return Promise.resolve(response)
  })
}

export function out(id) {
  let url = `troops/out/${id}`

  return http.get(url).then(response => {
    return Promise.resolve(response)
  })
}

export function user(params) {
  let url = `troops/user`

  return http.get(url, {params: params}).then(response => {
    return Promise.resolve(response)
  })
}

export function check(params) {
  let url = `troops/check`

  return http.get(url, {params: params}).then(response => {
    return Promise.resolve(response)
  })
}

export function lists() {
  let url = `troops/list`

  return http.get(url).then(response => {
    return Promise.resolve(response)
  })
}
